'use strict'
// Template version: 1.3.1
// see http://vuejs-templates.github.io/webpack for documentation.

const path = require('path');

module.exports = {
  moduleName: 'pages',
  dllVendor: [ // 单独打包的模块，主要是第三方js库
    'vue/dist/vue.esm.js', 'axios', 'qs', 'vux'
  ],
  dev: {
    host: '192.168.31.28', // 自己本机id地址
    port: 8015, // 端口
    isDebug: true,
    cdnBase: '"http://192.168.31.28:8015"',
    uriBase: '"/zth2Api"',
    taiqiuBase: '"/taiqiu"',
    lanqiuBase: '"/lanqiu"',
    yumaoqiuBase: '"/yumaoqiu"',
    wangqiuBase: '"/wangqiu"',
    zuqiuBase: '"/zuqiu"',
    quanjiBase: '"/quanji"',
    proxyTable: { // 代理
      '/zth2Api': {
        target: 'https://api.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/zth2Api/': '/'
        }
      },
      '/taiqiu': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/taiqiu/': '/'
        }
      },
      '/lanqiu': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/lanqiu/': '/'
        }
      },
      '/yumaoqiu': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/yumaoqiu/': '/'
        }
      },
      '/zuqiu': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/zuqiu/': '/'
        }
      },
      '/wangqiu': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/wangqiu/': '/'
        }
      },
      '/quanji': {
        target: 'https://tq.94xintuo.com',
        changeOrigin: true,
        pathRewrite: {
          '^/quanji/': '/'
        }
      },
    },

    assetsSubDirectory: 'static',
    assetsPublicPath: '/',
    autoOpenBrowser: false,
    errorOverlay: true,
    notifyOnErrors: true,
    poll: false,
    devtool: 'eval', //最快速度
    cacheBusting: true,
    cssSourceMap: true
  },

  build: {
    isDebug: false,
    uriBase: '"https://api.94xintuo.com"',
    taiqiuBase: '"https://tq.94xintuo.com"',
    lanqiuBase: '"https://tq.94xintuo.com"',
    yumaoqiuBase: '"https://tq.94xintuo.com"',
    wangqiuBase: '"https://tq.94xintuo.com"',
    zuqiuBase: '"https://tq.94xintuo.com"',
    quanjiBase: '"https://tq.94xintuo.com"',
    cdnBase: '"https://web.94xintuo.com/"',
    assetsPublicPath: 'https://web.94xintuo.com/',//自己测试学习用的,
    // cdnBase: '"https://www.linqinghu.cn/ph"',
    // assetsPublicPath: 'https://www.linqinghu.cn/ph',//自己测试学习用的,
    uglifyExclude: ['zthJsCallback'], //不混淆的函数


    index: path.resolve(__dirname, '../H5/index.html'),
    assetsRoot: path.resolve(__dirname, '../H5'),
    assetsRootName: 'H5', // build之后存放的目录名称，和assetsRoot要一致
    assetsSubDirectory: 'static',

    productionSourceMap: false, // 生产环境关闭source-map
    devtool: '#source-map',
    productionGzip: false, // 是否开启压缩，在nginx配置就行了
    productionGzipExtensions: ['js', 'css'],
    bundleAnalyzerReport: process.env.npm_config_report
  }
}
